package com.budwk.app.sqfw.models;

import com.budwk.app.sqfwV2.dto.entity.SqfwShopsBaseInfo;
import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ZY.Wang
 * @since 2023/7/17
 */
@Data
@Accessors(chain = true)
@Table("shequ.sqfw_form_summary_new")
@Comment("消防信息")
@ApiModel(description = "消防信息")
public class Sqfw_formSummary_new implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column
    @Name
    @Comment("编号")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    @PrevInsert(uu32 = true, nullEffective = true)
    private String id;

    @Column("sqfw_id")
    @Comment("服务id")
    @ApiModelProperty(description = "服务id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String sqfwId;

    @Column("work_order_id")
    @Comment("工单id")
    @ApiModelProperty(description = "工单id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String workOrderId;

    @Column("sqfw_flow_id")
    @Comment("服务工作流id")
    @ApiModelProperty(description = "服务工作流id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String sqfwFlowId;

    @Column("unit_id")
    @Comment("单位id")
    @ApiModelProperty(description = "单位id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String unitId;

    @Column("unit_name")
    @Comment("单位名称（巡查单位）")
    @ApiModelProperty(description = "单位名称")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String unitName;

    @Column("create_date")
    @Comment("创建时间")
    @ApiModelProperty(description = "创建时间")
    @ColDefine(type = ColType.TIMESTAMP, width = 120)
    private Date createDate;

    @Column("create_by")
    @Comment("上传人")
    @ApiModelProperty(description = "服务id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String createBy;

    @Column("create_user_name")
    @Comment("上传人名字(巡查人员名字)")
    @ApiModelProperty(description = "服务id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String createUserName;

    @Column("create_user_phone")
    @Comment("上传人手机")
    @ApiModelProperty(description = "服务id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String createUserPhone;

    @Column("update_date")
    @Comment("更新时间")
    @ApiModelProperty(description = "更新时间")
    @ColDefine(type = ColType.TIMESTAMP, width = 120)
    private Date updateDate;

    @Column("update_by")
    @Comment("修改人")
    @ApiModelProperty(description = "修改人")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String updateBy;

    @Column("update_user_name")
    @Comment("修改人姓名")
    @ApiModelProperty(description = "修改人姓名")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String updateUserName;

    @Column("update_user_phone")
    @Comment("修改人手机")
    @ApiModelProperty(description = "修改人手机")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String updateUserPhone;

    @Column("type")
    @Comment("类型 消防 12345 等")
    @ApiModelProperty(description = "服务id")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String type;

    @Column("fill_date")
    @Comment("填表日期")
    @ApiModelProperty(description = "填表日期")
    @ColDefine(type = ColType.DATETIME, width = 120)
    private Date fillDate;

    // wzy 2023-10-10 新增四个字段 用于数据权限
    @Column("province")
    @Comment("省份")
    @ApiModelProperty(description = "省份")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String province;

    @Column("city")
    @Comment("市")
    @ApiModelProperty(description = "市")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String city;

    @Column("district")
    @Comment("区")
    @ApiModelProperty(description = "区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String district;

    @Column("county")
    @Comment("街道")
    @ApiModelProperty(description = "街道")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String county;

    @Column("community")
    @Comment("社区")
    @ApiModelProperty(description = "社区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String community;

    @Column("license")
    @Comment("营业执照")
    @ApiModelProperty(description = "营业执照")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String license;

    @Column("issue_status")
    @Comment("隐患状态")
    @ApiModelProperty(description = "隐患状态(0:正常，1:现场，2:限期)")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String issueStatus;

    @Column("check_status")
    @Comment("检查状态（0:全部，1:已超时，2:未超时）")
    @ApiModelProperty(description = "检查状态")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String checkStatus;

    @Column("inspection_situation")
    @Comment("检查情况（1：未超时 3：已超时）")
    @ApiModelProperty(description = "检查情况")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String inspectionSituation;

    @Column("longitude")
    @Comment("经度")
    @ApiModelProperty(description = "经度")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String longitude;

    @Column("latitude")
    @Comment("纬度")
    @ApiModelProperty(description = "纬度")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String latitude;

    @Column("detail_address")
    @Comment("详细地址")
    @ApiModelProperty(description = "详细地址")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String detailAddress;

    @Column("param_data")
    @Comment("param_data")
    @ApiModelProperty(description = "详细数据")
    @ColDefine(type = ColType.TEXT)
    private String paramData;

    @Column("shops_base_info_id")
    @Comment("商铺基本信息表id")
    @ApiModelProperty(description = "商铺基本信息表id")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    public String shopsBaseInfoId;

    @Column("audit_status")
    @Comment("审核状态")
    @ApiModelProperty(description = "审核状态")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    public String auditStatus;

    // 新增字段做时间条件查询
    private String queryTime;

    @ApiModelProperty(description = "商铺基本信息")
    private SqfwShopsBaseInfo shopsBaseInfo;

    // 居住人数
    private Integer residentNumber = 0;

    @ApiModelProperty(description = "是否重新生成pdf")
    private Boolean reGeneratePDF = false;

    @ApiModelProperty(description = "拜访次数")
    private Integer visitNum;
}
